<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateRecommendDatasTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('recommend_datas', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('recommend_id')->unsigned()->default(0)->comment('推荐位ID');
            $table->string('name')->comment('推荐位名称');
            $table->string('title')->nullable()->comment('标题');
            $table->string('subtitle')->nullable()->comment('副标题');
            $table->string('href')->nullable()->comment('路由地址');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('recommend_datas');
    }
}
